﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Collections;
using SaleStat.COM.SQLHelper;
using SaleStat.COM.Constant;
using SaleStat.COM.Exceptions;
using SES.COM.SQLHelper;

namespace SaleStat.BLL
{
    public class Login_BLL
    {
        #region 全局定义
        /// <summary>
        /// XML文件名
        /// </summary>
        private string _XML_NAME = "Login";
        #endregion

        #region 取得用户信息
        /// <summary>
        /// 取得用户信息
        /// </summary>
        /// <param name="strUserName"></param>
        /// <param name="strPassWord"></param>
        /// <returns></returns>
        public DataTable getUserInfo(string strUserName, string strPassWord)
        {
            //参数封装
            ArrayList arrParam = new ArrayList();
            arrParam.Add(strUserName);
            arrParam.Add(strPassWord);

            DataTable dtUserInfo = DbHelper.ExecuteDataTable(_XML_NAME, SqlKeyConstant.Login_SQL001_R, arrParam);

            //返回用户信息
            return dtUserInfo;
        }
        #endregion

        #region 更新用户信息
        /// <summary>
        /// 更新用户信息
        /// </summary>
        /// <param name="arrParam"></param>
        /// <returns></returns>
        public int updateCustomerInfo(ArrayList arrParam)
        {
            return DbHelper.ExecuteNonQuery(_XML_NAME, SqlKeyConstant.Login_SQL002_U, arrParam);

        }
        #endregion

    }
}
